namespace PortalWeb.Dao.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class AddSystemFunctionIcon3 : DbMigration
    {
        public override void Up()
        {
            DropIndex("dbo.Functions", new[] { "Function_Id" });
            DropColumn("dbo.Functions", "ParentId");
            RenameColumn(table: "dbo.Functions", name: "Function_Id", newName: "ParentId");
            AlterColumn("dbo.Functions", "ParentId", c => c.Int());
            CreateIndex("dbo.Functions", "ParentId");
        }
        
        public override void Down()
        {
            DropIndex("dbo.Functions", new[] { "ParentId" });
            AlterColumn("dbo.Functions", "ParentId", c => c.Int(nullable: false));
            RenameColumn(table: "dbo.Functions", name: "ParentId", newName: "Function_Id");
            AddColumn("dbo.Functions", "ParentId", c => c.Int(nullable: false));
            CreateIndex("dbo.Functions", "Function_Id");
        }
    }
}
